<template>
    <div class="login">
        <div class="head_log">
            <h1 class="log">
                <!-- <a href="">
                    <img :src="$fnc.getImgUrl(logo)" alt="">
                    <div>
                       <p>{{logeTitle}}</p>
                    <p>{{logeTitle1}}</p>
                    </div>
                   
                </a> -->
            </h1>
        </div>
        <div class="log_warp">
            <Login :isOpen="isOpen"
                :logeTitle="logeTitle"></Login>
        </div>
    </div>
</template>
<script>
import Login from "@/components/login/Login.vue";
export default {
  name: "login",
  components: {
    Login
  },
  data() {
    return {
      logo: "",
      logeTitle: "",
      logeTitle1: "",
      isOpen: ""
    };
  },
  methods: {
    getConfig() {
      this.$api.login.getLoginConfig({}).then(res => {
        if (res.data.code == 200) {
          for (var i in res.data.result) {
            if (res.data.result[i].iden == "ht_title") {
              this.logeTitle = res.data.result[i].value;
              document.title = res.data.result[i].value;
              this.$store.commit("setAdminTitle", res.data.result[i].value);
            }

            if (res.data.result[i].iden == "ht_fubt") {
              this.logeTitle1 = res.data.result[i].value;
            }
            if (res.data.result[i].iden == "ht_login_logo") {
              this.logo = res.data.result[i].value;
            }
            if (res.data.result[i].iden == "ht_logo") {
              this.$store.commit("setHeadTitleInfo", res.data.result[i].value);
            }
            if (res.data.result[i].iden == "ht_dxdl") {
              this.isOpen = res.data.result[i].value;
            }
          }
        }
      });
    }
  },
  mounted() {
    this.getConfig();
  }
};
</script>

<style lang="less" scoped>
.login {
  position: relative;
  min-height: 100.1%;
  background: #5dd5c8 url("../assets/img/newbg.png") center bottom no-repeat;
  width: 100%;
}
.head_log {
  width: 100%;
  height: 100vh;
  position: relative;
}
.log {
  padding: 56px 0 0 60px;
  float: left;
  a {
    background: 0 0;
    width: auto;
    height: 60px;
    color: #fff;

    display: flex;
    p {
      text-align: left;
      vertical-align: top;
      color: #fff;
      font-size: 18px;
      margin-left: 24px;
      line-height: 26px;
      padding-top: 4px;
      font-weight: 400;
    }
  }
}
.log_warp {
  width: 410px;
  position: absolute;
  top: 50%;
  left: 50%;
  margin: -268px 0 0 -205px;
  background: #fff;
  border-radius: 5px;
  div {
    position: relative;
    width: 100%;
    padding: 35px 43px 0;
    background: #fff;
    border-radius: 8px;
    box-shadow: 1px 2px 15px rgba(0, 0, 0, 0.3);
  }
}
.btn_login {
  height: 40px;
  background: #5dd5c8;
  width: 100%;
  text-align: center;
  color: #fff;
  font-size: 16px;
}
</style>
